import request from '@/utils/request'

// 查询赛制管理列表
export function listCompetitionRules(query) {
  return request({
    url: '/race/competitionRules/list',
    method: 'get',
    params: query
  })
}

// 获取所有赛制列表（用于下拉选择）
export function getAllCompetitionRules() {
  return request({
    url: '/race/competitionRules/all',
    method: 'get'
  })
}

// 查询赛制管理详细
export function getCompetitionRules(id) {
  return request({
    url: '/race/competitionRules/' + id,
    method: 'get'
  })
}

// 新增赛制管理
export function addCompetitionRules(data) {
  return request({
    url: '/race/competitionRules',
    method: 'post',
    data: data
  })
}

// 修改赛制管理
export function updateCompetitionRules(data) {
  return request({
    url: '/race/competitionRules',
    method: 'put',
    data: data
  })
}

// 删除赛制管理
export function delCompetitionRules(id) {
  return request({
    url: '/race/competitionRules/' + id,
    method: 'delete'
  })
}
